package com.xzh.dao;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

@Mapper
public interface StatisticsMapper {
    @Select("SELECT COUNT(*) FROM students")
    Object getStudentCount();

    @Select("SELECT COUNT(*) FROM courses")

    Object getCourseCount();
    @Select("SELECT COUNT(*) FROM teachers")
    Object getTeachersCount();

    @Select("SELECT COALESCE(ROUND(AVG(rating), 1), 0.0) FROM course_reviews")
    Object getAverageRating();
}
